from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')

# 通过 nth-child() 定位input
ipt = driver.find_element(By.CSS_SELECTOR, '#form input:nth-child(11)')
print(ipt.get_attribute('outerHTML'))

driver.quit()